package com.xmy.cultivate.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.xmy.cultivate.entity.Role;
import com.xmy.cultivate.entity.RoleAdmin;
import com.xmy.cultivate.mapper.RoleAdminMapper;
import com.xmy.cultivate.service.IRoleAdminService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author min
 * @since 2022-09-09
 */
@Service
public class RoleAdminServiceImpl extends ServiceImpl<RoleAdminMapper, RoleAdmin> implements IRoleAdminService {


    @Autowired
    RoleAdminMapper roleAdminMapper;

    public List<Long> getRoleIdListForAdminId(Long adminId){
        return roleAdminMapper.getRoleIdListForAdminId(adminId);
    }

    public List<String> getAdminRoleNameList(Long adminId) {
        return roleAdminMapper.getAdminRoleNameList(adminId);
    }

    /**
     * 获取admin编号
     *
     * @return
     */
    @Override
    public Integer getAdminIdInteger() {
        return roleAdminMapper.getAdminIdInteger();
    }
}
